﻿-- =============================================
-- Script Template
-- =============================================
USE [IC.NET_NEW]
GO
CREATE TABLE #RowCounts(
noOfRows int)
GO
INSERT INTO #RowCounts
SELECT COUNT(*) AS [ROWS] FROM ContentTopic UNION
SELECT COUNT(*) AS [ROWS] FROM DistributionReference UNION
SELECT COUNT(*) AS [ROWS] FROM EmergencyMessageContainer UNION
SELECT COUNT(*) AS [ROWS] FROM EmergencyMessageContent UNION
SELECT COUNT(*) AS [ROWS] FROM ExposureCache UNION
SELECT COUNT(*) AS [ROWS] FROM ExposureCacheRole UNION
SELECT COUNT(*) AS [ROWS] FROM ExposureCategory UNION
SELECT COUNT(*) AS [ROWS] FROM NonXMLContent UNION
SELECT COUNT(*) AS [ROWS] FROM OriginatorRole UNION
SELECT COUNT(*) AS [ROWS] FROM Other UNION
SELECT COUNT(*) AS [ROWS] FROM Recipient UNION
SELECT COUNT(*) AS [ROWS] FROM RecipientRole UNION
SELECT COUNT(*) AS [ROWS] FROM SenderRole UNION
SELECT COUNT(*) AS [ROWS] FROM TargetArea UNION
SELECT COUNT(*) AS [ROWS] FROM XMLContent UNION
SELECT COUNT(*) AS [ROWS] FROM ConsumerRole UNION
SELECT COUNT(*) AS [ROWS] FROM ContainerTopic
GO
select SUM(noOfRows) AS Total
from #RowCounts
GO
DROP TABLE #RowCounts
GO